load("//eden/scm:targets.bzl", "rust_python_library")

oncall("sapling")

rust_python_library(
    name = "cpython-ext",
    srcs = glob(["src/**/*.rs"]),
    autocargo = {"cargo_toml_config": {
        "lib": {"name": "cpython-ext"},
        "package": {"name": "sapling-cpython-ext"},
    }},
    crate_root = "src/lib.rs",
    include_python_sys = True,
    test_deps = [
        "fbsource//third-party/rust:serde_bytes",
        "fbsource//third-party/rust:serde_cbor",
    ],
    deps = [
        "fbsource//third-party/rust:anyhow",
        "fbsource//third-party/rust:libc",
        "fbsource//third-party/rust:once_cell",
        "fbsource//third-party/rust:parking_lot",
        "fbsource//third-party/rust:serde",
        "fbsource//third-party/rust:thiserror",
        "fbsource//third-party/rust:tracing",
        "//eden/scm/lib/types:types",
    ],
)
